﻿Imports System.IO
Imports Objednavka
Imports System.Globalization

Partial Class Pages_ObchPodminky
    Inherits BasePage

    Public prihlasen As New Uzivatel


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim lokalizace As String = System.Globalization.CultureInfo.CurrentCulture.ToString
        Dim zeme As String = lokalizace.Substring(3)
        Dim VC As String = ""

        If Not IsNothing(Session("id_zakaznik")) Then
            prihlasen = CType(Session("id_zakaznik"), Uzivatel)
            If prihlasen.VC Then VC = "VC"
        Else
            prihlasen.VC = False
        End If

    Dim cesta As String
    If lokalizace <> "en-US" Then
      cesta = Server.MapPath("../HTML/") + "obchodni_podminky_" + zeme + VC + ".html"
    Else
      cesta = Server.MapPath("../HTML/") + "obchodni_podminky_" + zeme + ".html"
    End If
    Dim reader As StreamReader = File.OpenText(cesta)
    Dim obsah As String = reader.ReadToEnd()

    lit_htmlFile.Text = obsah

  End Sub
End Class
